-- include these lines in an initialization handler (see 'home
-- initializations' for more information):
global currCard, keyBtnFlag, keyBtnNum
put "nothing loaded" into currCard -- for 'KeyButton'
--
on invokeKeyButton
global currCard, keyBtnFlag, keyBtnNum
if (the ID of this card <> currCard) OR (keyBtnNum<1) then ¬
exit invokeKeyButton
put keyBtnFlag && "Button" && keyBtnNum into keySeg
put "click at the loc of" && keySeg into com1
do com1
end invokeKeyButton
on keyButton
global currCard, keyBtnFlag, keyBtnNum
if (the number of card buttons = 0) AND ¬
(the number of bkgnd buttons = 0) then exit keyButton
if the ID of this card <> currCard then
put the ID of this card into currCard
put 0 into keyBtnNum
if the number of card buttons = 0 then
put "Bkgnd" into keyBtnFlag
else
put "Card" into keyBtnFlag
end if
end if
put keyBtnFlag into oldKBF
put keyBtnNum into oldKBN
put "put the number of" && keyBtnFlag && "buttons into hm" into com1
do com1
repeat
add 1 to keyBtnNum
if keyBtnNum>hm then
if keyBtnFlag = "Card" then
if the number of bkgnd buttons > 0 then
put "Bkgnd" into keyBtnFlag
end if
else
if the number of card buttons > 0 then
put "Card" into keyBtnFlag
end if
end if
put "put the number of" && keyBtnFlag && "buttons into hm" ¬
into com1
do com1
put 1 into keyBtnNum
end if
if (keyBtnFlag=oldKBF) AND (keyBtnNum=oldKBN) then exit keyButton
put keyBtnFlag && "Button" && keyBtnNum into keySeg
put "put the visible of" && keyseg && "into isThere" into com1
do com1
if isThere then exit repeat
end repeat
put "set the hilite of" && keySeg && "to" into com1
put com1 && "NOT the hilite of" && keySeg into com1
do com1
put "set the hilite of" && keySeg && "to" into com1
put com1 && "NOT the hilite of" && keySeg into com1
do com1
end keyButton
-- part contents for background part 5
----- text -----
7/1/88 3:55 PM
-- part contents for background part 4
----- text -----
This is a way for you to click on buttons without using the mouse. KeyButton will cycle through all of the card and bkgnd buttons on a card, flashing the hilight momentarily. InvokeKeyButton will actually click on the button that was last chosen through KeyButton.